﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ESP;
using TimbreRecognition.Recognition.Model;

namespace TimbreRecognition.Recognition.ESP
{
    public class ESPNetworkWrapper: INetwork
    {
        private readonly Network network;

        private double[] output;

        public ESPNetworkWrapper(Network network)
        {
            this.network = network;
        }

        public double[] getOutput()
        {
            return output;
        }

        public void recalculateOutput(double[] input)
        {
           // network.resetActivation();

            double[] actualResult = new double[network.getOutputCount()];

            network.activate(input, actualResult);

            this.output = actualResult;
        }
    }
}
